package com.glasses.abc.business;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author Jean-Luc Burot
 * @since 2014-10-14
 */
public class TopMenuItem {
    public String itemValue;
    public String itemName;
    private List<TopMenuItem> subMenuItemList;
    
    public String getItemValue() {
        return itemValue;
    }
    
    public void setItemValue(String itemValue) {
        this.itemValue = itemValue;
    }
    
    public String getItemName() {
        return itemName;
    }
    
    public void setItemName(String itemName) {
        this.itemName = itemName;
    }
    
    public final List<TopMenuItem> getSubMenuItemList() {
        if (this.subMenuItemList == null)
            this.subMenuItemList = new ArrayList<>();
        
        return this.subMenuItemList;
    }
    
    public final void addSubMenuItem(TopMenuItem subMenuItem) {
        if (this.subMenuItemList == null)
            this.subMenuItemList = new ArrayList<>();
        
        this.subMenuItemList.add(subMenuItem);
    }
    
    public final void setSubMenuItemList(List<TopMenuItem> subMenuItemList) {
        if (this.subMenuItemList == null)
            this.subMenuItemList = new ArrayList<>();
        
        this.subMenuItemList = subMenuItemList;
    }
    
    public TopMenuItem(String itemName, String itemValue) {
        this.itemName = itemName;
        this.itemValue = itemValue;
    }
}
